package com.hongdee.crm.tdc.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hongdee.crm.tdc.mapper.CallRecordMapper;
import com.hongdee.crm.tdc.pojo.CallRecordVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangkai
 * @desc 一句话描述
 **/

@Service
public class CallRecordServiceImpl implements ICallRecordService {


    @Autowired
    private CallRecordMapper callRecordMapper;

    /***
     * 分页查询回访记录数
     * @param page
     * @param limit
     * @param companyId
     * @param vin
     * @param plateNum
     * @param sa
     * @param orderNum
     * @return
     * @throws Exception
     */
    @Override
    public PageInfo<CallRecordVo> queryPage(int page, int limit, String companyId, String vin, String plateNum, String sa, String orderNum) throws Exception {
        PageHelper.startPage(page, limit);
        List<CallRecordVo> ls = callRecordMapper.findCallRecord(companyId, vin, plateNum, sa, orderNum);
        PageInfo<CallRecordVo> info = new PageInfo<>(ls);
        return info;
    }


}
